Conversation
👷 Deploy request for selenium-dev pending review.Visit the deploys page to approve it
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
|
Hey @aguspe ... I fixed the gem file.. and code looking at the PR 2100 example. now everything fails :( . |
luke-hill
left a comment
There was a problem hiding this comment.
Few minor tidy ups if you are interested
| gem 'rubocop-rspec', '~> 3.0' | ||
| gem 'selenium-devtools', '= 0.133.0' | ||
| gem 'selenium-webdriver', '= 4.29.1' | ||
| gem 'selenium-devtools', '= 0.134.0' |
There was a problem hiding this comment.
Traditionally exact versions can be provided just by doing '0.134.0' (Same below)
| let(:wait) { Selenium::WebDriver::Wait.new(timeout: 2) } | ||
|
|
||
| it 'interacts with elements inside iframes' do | ||
| #navigate to web page |
There was a problem hiding this comment.
The code comments might trip up IDE's as generally they have one space infront of the #
| # Switch to iframe using WebElement | ||
| iframe = driver.find_element(id: 'iframe1') | ||
| driver.switch_to.frame(iframe) | ||
| expect(driver.page_source.include?('We Leave From Here')).to be true |
There was a problem hiding this comment.
| expect(driver.page_source.include?('We Leave From Here')).to be true | |
| expect(driver.page_source).to include('We Leave From Here') |
Reason. RSpec exposes these booleans and it's a way of getting a better error message if it occurs
| # Switch to iframe using name | ||
| iframe=driver.find_element(name: 'iframe1-name') | ||
| driver.switch_to.frame(iframe) | ||
| expect(driver.page_source.include?('We Leave From Here')).to be true |
There was a problem hiding this comment.
| expect(driver.page_source.include?('We Leave From Here')).to be true | |
| expect(driver.page_source).to include('We Leave From Here') |
|
Thank you very much @luke-hill |
User description
Thanks for contributing to the Selenium site and documentation!
A PR well described will help maintainers to review and merge it quickly
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, and help reviewers by making them as simple and short as possible.
added frame code
Description
added frame code
Motivation and Context
Types of changes
Checklist
PR Type
Tests, Documentation
Description
Added a comprehensive Ruby test for iframe interactions.
Updated Ruby code snippets in multiple documentation files.
Improved iframe-related documentation across various languages.
Modified Hugo configuration to ignore specific errors.
Changes walkthrough 📝
frames_spec.rb
Add Ruby test for iframe interactionsexamples/ruby/spec/interactions/frames_spec.rb
frames.en.md
Update Ruby iframe examples in English documentationwebsite_and_docs/content/documentation/webdriver/interactions/frames.en.md
frames.ja.md
Update Ruby iframe examples in Japanese documentationwebsite_and_docs/content/documentation/webdriver/interactions/frames.ja.md
frames.pt-br.md
Update Ruby iframe examples in Brazilian Portuguese documentationwebsite_and_docs/content/documentation/webdriver/interactions/frames.pt-br.md
frames.zh-cn.md
Update Ruby iframe examples in Chinese documentationwebsite_and_docs/content/documentation/webdriver/interactions/frames.zh-cn.md
hugo.toml
Update Hugo configuration for error handlingwebsite_and_docs/hugo.toml